﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ImportExcel.ascx.vb" Inherits="Control_Product_ImportExcel" %>
<div  class="BoxField">

    <div class="HeadTitle">
         <h3>
            <asp:Label ID="Label3" runat="server" Text="IMPORT DỮ LIỆU TỪ EXCEL" /></h3>
     </div>
   

<div class="DivRow">
	<div class="DivLeft">
		Chọn file<span class="fieldRequired"></span> (chọn file .xls hoặc .xslx)
	</div>
	<div>
		<asp:TextBox ID="txtFileUploadName" runat="server" CssClass="TextBox" MaxLength="200"
			Width="400px" ClientIDMode="Static"></asp:TextBox>
		<input id="btnSelectFile" type="button" value="Chọn file . . ." class="btn" />
		<asp:FileUpload ID="flDocument" runat="server" CssClass="TextBox" Height="22px" Style="display: none"
			onchange="javascript:return ResetDataControl();" size="59px" Width="450px" /> &nbsp; <asp:HyperLink ID="hplFileTemplate" runat="server" Text="Template" />
	</div> 
</div>
<div style="clear: both; height: 15px">
</div>

<div class="DivRow">
	
        <asp:Button ID="btnProcess" runat="server" CssClass="btn" Text=" Xử lý dữ liệu file "
				OnClientClick="return SubmitForm();" />

</div>
</div>
<script type="text/javascript">
    $(function () {
        $("#div_tab").tabs();
        $("#btnSelectFile").click(function () {
            $("#<%= flDocument.ClientID%>").click();
        });
        $("#txtFileUploadName").bind("click", function () {
            $("#<%= flDocument.ClientID%>").click();
        });
    });

    function ResetDataControl() {
        //Alertbox('Hệ thống sẽ tiến hành xử lý dữ liệu của file.');
        $("#<%=txtFileUploadName.ClientID%>").val('');
        if ($("#<%=flDocument.ClientID%>").val().trim() != "") {
            $("#<%=txtFileUploadName.ClientID%>").val($("#<%=flDocument.ClientID%>").val().trim());
        }
    }
    function SubmitForm() {
        $("#ctl00_UpdateProgress1").css({ display: "block" });
        return true;
    }

</script>
